<template>
  <view class="equipment-container">
    <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="true">
      <view class="product-list">
        <u-cell :value="item.gbDeviceId" :title="item.channelName" v-for="(item, key) in dataList" :key="key" @click="handleClick(item)"></u-cell>
      </view>
    </z-paging>
  </view>
</template>

<script>
import { getMsgList, customCvrTs } from "@/apis/equipment"
export default {
  data() {
    return {
      dataList: [],
    }
  },
  methods: {
    queryList(page, count) {
      getMsgList({ page, count }).then((res) => {
        console.log(res)
        // this.dataList = res;
        this.$refs.paging.complete(res.list)
      })
    },
    handleClick(item) {
      uni.setStorageSync("errInfo", item)
      uni.navigateTo({
        url: "/pagesIndex/errPlay?id=" + item.id,
      })

      // customCvrTs(item).then(res => {
      //   console.log(res)
      // })
    },
  },
  onLoad() {},
  onShow() {},
  created() {
    
  },
}
</script>

<style lang="less" scoped>
.product-list {
  box-sizing: border-box;
  width: 710rpx;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 16rpx;
  margin-top: 30rpx;
}
</style>
